@use 'breakpoints.scss' as *;

.readerFlex{
  //   background-color:red;
  // display:flex;
  grid-template-rows: auto 1fr auto;
  display: grid;
  flex-direction: column;
  height: 100%;
}

.readerTitleBar{
  width: 100%;
  // height: 25px;
  //Temp for bug testing
  height: 50px;
  //   background-color:green;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-primary);
  background-color: var(--background-primary);
  // padding-top:10px;
  user-select: none;
  grid-area: 1/1;
  transition: .3s;
}
.readerTitleBar div{
  transition: 0.3s;
}

@mixin buttonContainer{
  flex-grow: 1;
  display:flex;
  gap:10px;
  transition: 0.3s;
  height:100%;
  align-items: center;
  

  // This allows pointer events to passthrough to the tauri dragable parent titlebar element.
  user-select: none;
  pointer-events: none;

  & > svg{
    transition: 0.2s;
    // default
    pointer-events:auto;
    // stroke-width: 1px;
    cursor:pointer;
    color: var(--text-secondary);

    &:hover{
      color:var(--text-primary);
    }
    &:active{
      opacity: 0.5;
    }
  }

}


.menuButtonContainerLeft{
  @include buttonContainer;

  padding-left:20px;
  flex-basis: 50px;
  

  & > svg:first-of-type{
    
    margin-right:15px;
    // stroke-width: 1px;
  }
  @include lt-sm{
    & > svg:first-of-type{
      margin-right:0px;
    }
  }

}

.menuButtonContainerRight{
  @include buttonContainer;
  overflow: hidden;
  // flex-grow: 1;
  display: flex;
  justify-content: flex-end;
  flex-basis: 75px;
  min-width: 280px;
  padding-left:20px;
  gap:10px;
  
  & > svg:last-of-type{
    margin-left:20px;
    margin-right:-20px;
  }
  @include lt-sm{
    padding-right:20px;
    min-width: 50px;
    & > div:last-of-type{
      display: none;
    }
    & > svg:last-of-type{
      margin-left:10px;
      margin-right:0px;
    }
  }

}

.optionsToggled{
  opacity: 0;
  // pointer-events: none !important;

  & > *{
    pointer-events: none !important;
  }
}

.title{
  color:var(--text-primary);
  width: fit-content;
  flex-grow: 1;
  text-align: center;
  user-select: none;
  pointer-events: none;

  max-width: fit-content;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow:hidden;
  // text-overflow:ellipsis;
  // white-space: nowrap;
}

.titleBarButtonsContainer{
  display:none;
}

.arrowButtonContainer {
  cursor:pointer;
  flex-grow:1;
  height:100%;
  color:var(--text-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 50px;
  transition: 0.15s;
  &:hover{
    opacity: 0.8;
  }
  &:active{
    opacity: 0.5;
  }
}

.arrowButtonContainer:hover{
  color: var(--text-primary);
}

.readerFooterBar{
  height: 50px;
  width: 100%;
  display:flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  grid-area: 3/1;
  transition: .3s;
  background-color: var(--background-primary);
  z-index: 1;
}





.sliderContainer{
  height: 100%;
  flex-grow:1;
  display: flex;
  align-items: center;
  transition: 0.3s;
}




.opaqueScreen{
  width: 100%;
  transition: 0.25s;
}
.opaqueScreenActive{
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  grid-area: 2/1/4/1;
  z-index: 0;
}



.readerBackgroundFallback{
  grid-area: 2/1/4/1;
  z-index: 0;
  outline-style: none;
}


.readerViewsContainer{
  grid-row: 2;
  grid-column: 1;
  overflow:hidden;
  display:grid;
  grid-template-columns: 1fr;
}

.percentageContainer{
  width: 50px;
  height: 100%;
  display:flex;
  align-content: center;
  justify-content: center;
  align-items: center;
  // padding-right:15px;
  cursor:pointer;
  // border: 1px solid gray;
  // padding-right:5px;
  margin-right:15px;
  // background-color:black;
  // text-align: center;
  color:var(--text-primary);

  transition: 0.15s;
  &:hover{
    opacity: 0.8;
  }
  &:active{
    opacity: 0.5;
  }
}
.percentageContainer:hover{
  background-color:rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}